package site.isscloud.project.mapper;

import org.apache.ibatis.annotations.Param;
import site.isscloud.project.domain.PjStatsTemperatureHour;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 小时级温度统计Mapper接口
 */
public interface PjStatsTemperatureHourMapper {

    int insertPjStatsTemperatureHour(PjStatsTemperatureHour stats);

    int selectCountByDeviceChannelAndTime(@Param("deviceNo") String deviceNo,
                                          @Param("channelNo") Integer channelNo,
                                          @Param("statTime") LocalDateTime statTime);

    List<PjStatsTemperatureHour> selectByDeviceChannelAndDate(@Param("deviceNo") String deviceNo,
                                                              @Param("channelNo") Integer channelNo,
                                                              @Param("statDate") String statDate);

    List<PjStatsTemperatureHour> selectByDeviceChannelAndTimeRange(@Param("deviceNo") String deviceNo,
                                                                   @Param("channelNo") Integer channelNo,
                                                                   @Param("startTime") String startTime,
                                                                   @Param("endTime") String endTime);
}